<?php
	require_once 'data.php';
	$con = mysql_connect($mysql_host, $mysql_user, $mysql_password);
	if (!$con)
	{
		die('Could not connect: ' . mysql_error());
	} else {
		mysql_select_db($mysql_database, $con);
		if (isset($_GET['lat']) && isset($_GET['lon']) && isset($_GET['id']))
			$sql = "insert into snap (lat, lon, idPers) values (" . $_GET['lat'] . ", " . $_GET['lon'] ."," . $_GET['id'] . ")"; 

		mysql_query($sql);				
		mysql_close($con);
	}
?>